package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the CHANCEINFO database table.
 * 
 */
@Entity
@NamedQuery(name="Chanceinfo.findAll", query="SELECT c FROM Chanceinfo c")
public class Chanceinfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="CHANCEINFO_ID_SEQ", sequenceName="CHANCEINFO_ID_SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CHANCEINFO_ID_SEQ")
	private Long ciid;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	private Date birth;

	private BigDecimal expectmoney;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	private Date expecttime;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	private Date findtime;

	@Column(name="\"FIRST\"")
	private String first;

	private BigDecimal foreigncurrency;

	@Column(name="\"From\"")
	private String from;

	private BigDecimal logic;

	private String possibility;

	private String provider;

	private String stage;

	private String stageremark;

	private BigDecimal stagestop;

	private BigDecimal stars;

	private String status;

	private String theme;

	@Column(name="\"TYPE\"")
	private String type;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	private Date updated;

	//bi-directional many-to-one association to Chancefollowlog
	@OneToMany(mappedBy="chanceinfo")
	@JSONField(serialize=false)
	private List<Chancefollowlog> chancefollowlogs;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="CUSNO")
	private Customer customer;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;

	//bi-directional many-to-one association to Detailedrequirement
	@OneToMany(mappedBy="chanceinfo")
	@JSONField(serialize=false)
	private List<Detailedrequirement> detailedrequirements;

	//bi-directional many-to-one association to Offerinfo
	@OneToMany(mappedBy="chanceinfo")
	@JSONField(serialize=false)
	private List<Offerinfo> offerinfos;

	//bi-directional many-to-one association to Rivalfirm
	@OneToMany(mappedBy="chanceinfo")
	@JSONField(serialize=false)
	private List<Rivalfirm> rivalfirms;

	//bi-directional many-to-one association to Solution
	@OneToMany(mappedBy="chanceinfo")
	@JSONField(serialize=false)
	private List<Solution> solutions;
	
	//bi-directional many-to-one association to Linkman
	@ManyToOne
	@JoinColumn(name="LINKNO")
	private Linkman linkman;
	
	
	@Transient
	private String range1;
	
	@Transient
	private String range2;
	
	@Transient
	private String range3;
	
	@Transient
	private String range4;
	
	@Transient
	private Date startDateFind;
	
	@Transient
	private Date endDateFind;
	
	@Transient
	private Date startDateExpect;
	
	@Transient
	private Date endDateExpect;
	
	@Transient
	private Date startDateUpdate;
	
	@Transient
	private Date endDateUpdate;
	
	@Transient
	private Date startDateBirth;
	
	@Transient
	private Date endDateBirth;
	
	@Transient
	private List<String> queryFrom;
	
	@Transient
	private List<String> queryStage;
	
	@Transient
	private List<Long> queryUserID;
	
	@Transient
	private List<String> queryStatus;
	
	@Transient
	private List<String> queryFirst;
	
	@Transient
	private List<BigDecimal> queryStar;
	
	@Transient
	private List<String> queryType;
	
	

	public Chanceinfo() {
	}

	public Long getCiid() {
		return this.ciid;
	}

	public void setCiid(Long ciid) {
		this.ciid = ciid;
	}

	public Date getBirth() {
		return this.birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public BigDecimal getExpectmoney() {
		return this.expectmoney;
	}

	public void setExpectmoney(BigDecimal expectmoney) {
		this.expectmoney = expectmoney;
	}

	public Date getExpecttime() {
		return this.expecttime;
	}

	public void setExpecttime(Date expecttime) {
		this.expecttime = expecttime;
	}

	public Date getFindtime() {
		return this.findtime;
	}

	public void setFindtime(Date findtime) {
		this.findtime = findtime;
	}

	public String getFirst() {
		return this.first;
	}

	public void setFirst(String first) {
		this.first = first;
	}

	public BigDecimal getForeigncurrency() {
		return this.foreigncurrency;
	}

	public void setForeigncurrency(BigDecimal foreigncurrency) {
		this.foreigncurrency = foreigncurrency;
	}

	public String getFrom() {
		return this.from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public BigDecimal getLogic() {
		return this.logic;
	}

	public void setLogic(BigDecimal logic) {
		this.logic = logic;
	}

	public String getPossibility() {
		return this.possibility;
	}

	public void setPossibility(String possibility) {
		this.possibility = possibility;
	}

	public String getProvider() {
		return this.provider;
	}

	public void setProvider(String provider) {
		this.provider = provider;
	}

	public String getStage() {
		return this.stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public String getStageremark() {
		return this.stageremark;
	}

	public void setStageremark(String stageremark) {
		this.stageremark = stageremark;
	}

	public BigDecimal getStagestop() {
		return this.stagestop;
	}

	public void setStagestop(BigDecimal stagestop) {
		this.stagestop = stagestop;
	}

	public BigDecimal getStars() {
		return this.stars;
	}

	public void setStars(BigDecimal stars) {
		this.stars = stars;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	public List<Chancefollowlog> getChancefollowlogs() {
		return this.chancefollowlogs;
	}

	public void setChancefollowlogs(List<Chancefollowlog> chancefollowlogs) {
		this.chancefollowlogs = chancefollowlogs;
	}

	public Chancefollowlog addChancefollowlog(Chancefollowlog chancefollowlog) {
		getChancefollowlogs().add(chancefollowlog);
		chancefollowlog.setChanceinfo(this);

		return chancefollowlog;
	}

	public Chancefollowlog removeChancefollowlog(Chancefollowlog chancefollowlog) {
		getChancefollowlogs().remove(chancefollowlog);
		chancefollowlog.setChanceinfo(null);

		return chancefollowlog;
	}

	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<Detailedrequirement> getDetailedrequirements() {
		return this.detailedrequirements;
	}

	public void setDetailedrequirements(List<Detailedrequirement> detailedrequirements) {
		this.detailedrequirements = detailedrequirements;
	}

	public Detailedrequirement addDetailedrequirement(Detailedrequirement detailedrequirement) {
		getDetailedrequirements().add(detailedrequirement);
		detailedrequirement.setChanceinfo(this);

		return detailedrequirement;
	}

	public Detailedrequirement removeDetailedrequirement(Detailedrequirement detailedrequirement) {
		getDetailedrequirements().remove(detailedrequirement);
		detailedrequirement.setChanceinfo(null);

		return detailedrequirement;
	}

	public List<Offerinfo> getOfferinfos() {
		return this.offerinfos;
	}

	public void setOfferinfos(List<Offerinfo> offerinfos) {
		this.offerinfos = offerinfos;
	}

	public Offerinfo addOfferinfo(Offerinfo offerinfo) {
		getOfferinfos().add(offerinfo);
		offerinfo.setChanceinfo(this);

		return offerinfo;
	}

	public Offerinfo removeOfferinfo(Offerinfo offerinfo) {
		getOfferinfos().remove(offerinfo);
		offerinfo.setChanceinfo(null);

		return offerinfo;
	}

	public List<Rivalfirm> getRivalfirms() {
		return this.rivalfirms;
	}

	public void setRivalfirms(List<Rivalfirm> rivalfirms) {
		this.rivalfirms = rivalfirms;
	}

	public Rivalfirm addRivalfirm(Rivalfirm rivalfirm) {
		getRivalfirms().add(rivalfirm);
		rivalfirm.setChanceinfo(this);

		return rivalfirm;
	}

	public Rivalfirm removeRivalfirm(Rivalfirm rivalfirm) {
		getRivalfirms().remove(rivalfirm);
		rivalfirm.setChanceinfo(null);

		return rivalfirm;
	}

	public List<Solution> getSolutions() {
		return this.solutions;
	}

	public void setSolutions(List<Solution> solutions) {
		this.solutions = solutions;
	}

	public Solution addSolution(Solution solution) {
		getSolutions().add(solution);
		solution.setChanceinfo(this);

		return solution;
	}

	public Solution removeSolution(Solution solution) {
		getSolutions().remove(solution);
		solution.setChanceinfo(null);

		return solution;
	}

	public Linkman getLinkman() {
		return linkman;
	}

	public void setLinkman(Linkman linkman) {
		this.linkman = linkman;
	}

	public String getRange1() {
		return range1;
	}

	public void setRange1(String range1) {
		this.range1 = range1;
	}

	public String getRange2() {
		return range2;
	}

	public void setRange2(String range2) {
		this.range2 = range2;
	}

	public String getRange3() {
		return range3;
	}

	public void setRange3(String range3) {
		this.range3 = range3;
	}

	public String getRange4() {
		return range4;
	}

	public void setRange4(String range4) {
		this.range4 = range4;
	}

	public Date getStartDateFind() {
		return startDateFind;
	}

	public void setStartDateFind(Date startDateFind) {
		this.startDateFind = startDateFind;
	}

	public Date getEndDateFind() {
		return endDateFind;
	}

	public void setEndDateFind(Date endDateFind) {
		this.endDateFind = endDateFind;
	}

	public Date getStartDateExpect() {
		return startDateExpect;
	}

	public void setStartDateExpect(Date startDateExpect) {
		this.startDateExpect = startDateExpect;
	}

	public Date getEndDateExpect() {
		return endDateExpect;
	}

	public void setEndDateExpect(Date endDateExpect) {
		this.endDateExpect = endDateExpect;
	}

	public Date getStartDateUpdate() {
		return startDateUpdate;
	}

	public void setStartDateUpdate(Date startDateUpdate) {
		this.startDateUpdate = startDateUpdate;
	}

	public Date getEndDateUpdate() {
		return endDateUpdate;
	}

	public void setEndDateUpdate(Date endDateUpdate) {
		this.endDateUpdate = endDateUpdate;
	}

	public Date getStartDateBirth() {
		return startDateBirth;
	}

	public void setStartDateBirth(Date startDateBirth) {
		this.startDateBirth = startDateBirth;
	}

	public Date getEndDateBirth() {
		return endDateBirth;
	}

	public void setEndDateBirth(Date endDateBirth) {
		this.endDateBirth = endDateBirth;
	}

	public List<String> getQueryFrom() {
		return queryFrom;
	}

	public void setQueryFrom(List<String> queryFrom) {
		this.queryFrom = queryFrom;
	}

	public List<String> getQueryStage() {
		return queryStage;
	}

	public void setQueryStage(List<String> queryStage) {
		this.queryStage = queryStage;
	}

	public List<Long> getQueryUserID() {
		return queryUserID;
	}

	public void setQueryUserID(List<Long> queryUserID) {
		this.queryUserID = queryUserID;
	}

	public List<String> getQueryStatus() {
		return queryStatus;
	}

	public void setQueryStatus(List<String> queryStatus) {
		this.queryStatus = queryStatus;
	}

	public List<String> getQueryFirst() {
		return queryFirst;
	}

	public void setQueryFirst(List<String> queryFirst) {
		this.queryFirst = queryFirst;
	}

	public List<BigDecimal> getQueryStar() {
		return queryStar;
	}

	public void setQueryStar(List<BigDecimal> queryStar) {
		this.queryStar = queryStar;
	}

	public List<String> getQueryType() {
		return queryType;
	}

	public void setQueryType(List<String> queryType) {
		this.queryType = queryType;
	}
	

}